﻿using System;
using ProjectDanmaku.Scenario;
using TMPro;
using UnityEngine;

namespace ProjectDanmaku.UI
{
    public class GameTimeText : MonoBehaviour
    {
        private TMP_Text _text;

        private void Awake()
        {
            _text = gameObject.GetComponent<TMP_Text>();
        }

        private void Update()
        {
            _text.text = $"游戏时长: {DanmakuScenario.GameStatistics.GameTime:0.0}s";
        }
    }
}